  //获取应用实例
var app = getApp();
Page({
    data: {
        orderId:"",
        acceptStatusClass:"success_fit",
        acceptStatusName:"",
        acceptStatusDetail:"",
    },
    onLoad: function () {
        let data =  app.getStorageSync(app.globalData.cacheOrderPay);
        let isYue = data['address.provinceName'].indexOf('广东省')>-1?true:false;
        this.setData({
            acceptStatusName: isYue?'邮寄受理成功':'支付成功',
            acceptStatusDetail: isYue?'邮寄受理成功，证件正在制作中，请耐心等候':'支付成功，证件正在制作中，请耐心等候',
            cardApplicant: data.cardApplicant,
            orderId: data.orderId
        })

        wx.setNavigationBarTitle({
            title: isYue?'邮寄受理成功':'支付成功' //页面标题为路由参数
        })

        var page = app.getStorageSync(app.globalData.cacheTravelData);
        app.setStorageSync(app.globalData.cacheTravelData,Object.assign({},page,
            {applicant: ''},{cardFix: ''},{cardNbr: ''}
        ))
        app.setStorageSync('arriveSuccess',1)

    },
    onHide:function () {        
        app.removeStorageSync(app.globalData.cacheOrderPay);
  	},
    detailTap:function (e) {
        var orderId = e.currentTarget.dataset.id;
        app.redirectTo({
            url: '../travelOrderDetail/travelOrderDetail?orderId='+orderId
        });
    },
});
